﻿<UserControl x:Class="GTServices.WPF.Client.Views.Entities.SubLanguageView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
             xmlns:controls="clr-namespace:GTServices.WPF.Client.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <DockPanel>
        <StackPanel DockPanel.Dock="Top">
            <UniformGrid Columns="1" Rows="1" IsEnabled="False">
                <GroupBox Header="Id">
                    <TextBox Text="{Binding SubLanguage.Id}" HorizontalContentAlignment="Right"/>
                </GroupBox>
            </UniformGrid>
        </StackPanel>
        <DockPanel DockPanel.Dock="Bottom">
            <StackPanel DockPanel.Dock="Top">
                <GroupBox Header="Name">
                    <TextBox Text="{Binding SubLanguage.Name}" HorizontalContentAlignment="Right"/>
                </GroupBox>
                <GroupBox Header="Language">
                    <TextBox Text="{Binding SubLanguage.Language.Name}" HorizontalContentAlignment="Right"/>
                </GroupBox>
            </StackPanel>
            <TabControl DockPanel.Dock="Bottom">
                <TabItem Header="Extensions">
                    <DockPanel>
                        <StackPanel DockPanel.Dock="Right">
                            <controls:ClickableLabel Text="Add"    cal:Message.Attach="[Event Click] = [Action Add('FileExtension')]"    />
                            <controls:ClickableLabel Text="Remove" cal:Message.Attach="[Event Click] = [Action Remove('FileExtension')]" />
                            <controls:ClickableLabel Text="Create" cal:Message.Attach="[Event Click] = [Action Create('FileExtension')]" />
                            <controls:ClickableLabel Text="Edit"   cal:Message.Attach="[Event Click] = [Action Edit('FileExtension')]"   />
                        </StackPanel>
                        <ListView DockPanel.Dock="Left" SelectedItem="{Binding SelectedFileExtension}" ItemsSource="{Binding FileExtensions}" ScrollViewer.VerticalScrollBarVisibility="Visible">
                            <ListView.View>
                                <GridView>
                                    <GridViewColumn Header="Extension" DisplayMemberBinding="{Binding Extension}" />
                                </GridView>
                            </ListView.View>
                        </ListView>
                    </DockPanel>
                </TabItem>
                
            </TabControl>
        </DockPanel>
    </DockPanel>
</UserControl>
